#include <stdio.h>

#define FAILURE -1
#define SUCCESS 1

typedef char ElemSet;
typedef int Status;

typedef struct LNode{
	ElemSet* data;
	struct LNode *next;
}LNode,*LinkList;

void InitHead(LinkList* a){
	*a=(LinkList)malloc(sizeof(ElemSet));
}

Status FillList(LinkList L,int i,ElemSet* str,int len){
	LinkList r=NULL,p=L,q=NULL;
	int index=1;
	while(p!=NULL && index++<i){
		p=p->next;
	}
	if(p==NULL || index>i && index==1) return FAILURE;
	r=(LinkList)malloc(sizeof(LNode));
	ElemSet* da=(ElemSet*)malloc(len*sizeof(ElemSet));
	for(int i=0;i<len;i++){
		da[i]=str[i];
	}
	r->data=da;
	r->next=p->next;
	p->next=r;
	return SUCCESS;
}

